home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gsfuncv.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  2.1 KB  |  65 lines

  1. /* Copyright (C) 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gsfuncv.h,v 1.2 2000/09/19 19:00:28 lpd Exp $ */
  20. /* Definitions for "Vanilla" Functions */
  21.  
  22. #ifndef gsfuncv_INCLUDED
  23. #  define gsfuncv_INCLUDED
  24.  
  25. #include "gsfunc.h"
  26.  
  27. /*
  28.  * The simplest type of Function, "Vanilla" Functions just store closure
  29.  * data.  The client provides the evaluation procedure.
  30.  */
  31.  
  32. /* ---------------- Types and structures ---------------- */
  33.  
  34. #define function_type_Vanilla (-1)
  35.  
  36. typedef struct gs_function_Va_params_s {
  37.     gs_function_params_common;
  38.     fn_evaluate_proc_t eval_proc;
  39.     void *eval_data;
  40.     int is_monotonic;
  41. } gs_function_Va_params_t;
  42.  
  43. typedef struct gs_function_Va_s {
  44.     gs_function_head_t head;
  45.     gs_function_Va_params_t params;
  46. } gs_function_Va_t;
  47.  
  48. #define private_st_function_Va()    /* in gsfunc.c */\
  49.   gs_private_st_suffix_add1(st_function_Va, gs_function_Va_t,\
  50.     "gs_function_Va_t", function_Va_enum_ptrs, function_Va_reloc_ptrs,\
  51.     st_function, params.eval_data)
  52.  
  53. /* ---------------- Procedures ---------------- */
  54.  
  55. /* Allocate and initialize a Vanilla function. */
  56. int gs_function_Va_init(P3(gs_function_t ** ppfn,
  57.                const gs_function_Va_params_t * params,
  58.                gs_memory_t * mem));
  59.  
  60. /* Free the parameters of a Vanilla function. */
  61. void gs_function_Va_free_params(P2(gs_function_Va_params_t * params,
  62.                    gs_memory_t * mem));
  63.  
  64. #endif /* gsfuncv_INCLUDED */
  65.